package com.aooci.ordercat.service;

import java.util.Date;
import java.util.List;

import com.aooci.ordercat.domain.DiningTable;
import com.aooci.ordercat.domain.ItemCategory;
import com.aooci.ordercat.domain.SortGroup;
import com.aooci.ordercat.domain.Takeaway;
import com.aooci.ordercat.vo.CheckoutVo;
import com.aooci.ordercat.vo.ItemVo;
import com.aooci.ordercat.vo.OperatedOrderVo;
import com.aooci.ordercat.vo.OrderedItemVo;
import com.aooci.ordercat.vo.TakeawayVo;

public interface OrderOperationService {
	
	public OperatedOrderVo createDiningTableOrder(int diningTableId, int nofClient);
	
	public void discardDiningTableOrder(int diningTableId);
	
	public void discardTakeawayOrder(int takeawayId);
	
	public OperatedOrderVo loadDiningTableOrder(int diningTableId);
	
	public OperatedOrderVo loadTakeawayOrder(int takeawayId);
	
	public OperatedOrderVo createTakeawayOrder();
	
	public List<ItemCategory> loadItemCategories();
	
	public List<ItemCategory> loadItemCategoriesByDisplayZone(int displayZone);
	
	public List<ItemVo> loadItemsByItemCategoryId(int itemCategoryId);
	
	public List<ItemVo> loadAllItems();

	public List<OrderedItemVo> loadOrderedItems(int ordercatId);
	
	public OrderedItemVo orderItem(OperatedOrderVo operatedOrderVo, ItemVo itemVo);
	
	public void disorderItem(OperatedOrderVo operatedOrderVo, int orderedItemEntityId);
	
	public OrderedItemVo updateOrderedItem(OperatedOrderVo operatedOrderVo, OrderedItemVo orderedItemVo);
	
	public List<DiningTable> loadFreeDiningTablesByCategoryId(int diningTableCategoryId);
	
	public DiningTable changeTable(DiningTable currentTable, int targetTableId);
	
	public Takeaway changeTakingTime(TakeawayVo currentTakeaway, Date newTakingTime);
	
	public void checkout(OperatedOrderVo operatedOrderVo);
	
	public boolean validateEncase(CheckoutVo checkoutVo);
	
	public void clearOrder(OperatedOrderVo operatedOrderVo, CheckoutVo checkoutVo);
	
	public void reopenOrder(OperatedOrderVo operatedOrderVo);
	
	public List<SortGroup> loadKitchenPrintableSortGroups();
	
	public CheckoutVo loadCheckoutVo(int ordercatId);
	
	public void updateCheckoutVo(CheckoutVo checkoutVo, OperatedOrderVo operatedOrderVo);
	
	//public String dealCommand(OperatedOrderVo operatedOrderVo, String commandValue);
	
}
